package com.bj.dz.controller;

import com.bj.dz.entity.WaterfactorypoolDataformat;
import com.bj.dz.service.WaterfactorypoolDataformatService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

/***
*   控制器
*/
@Api(tags = "【waterfactorypoolDataformat】提供服务接口")
@RestController
@RequestMapping("/waterfactorypoolDataformat")
public class WaterfactorypoolDataformatController {

    @Resource
    private WaterfactorypoolDataformatService waterfactorypoolDataformatService;

    /**
    * 通过id查询
    * @param
    * @return
    */
    @ApiOperation(value = "查找服务")
    @RequestMapping(value="/findById",method = RequestMethod.POST, produces = "application/json;" +"charset=UTF-8")
    public WaterfactorypoolDataformat findWaterfactorypoolDataformatById(@ApiParam(name = "id",value = "WaterfactorypoolDataformat的id",required = true) @RequestParam(value = "id",required=true)Integer id){
        return waterfactorypoolDataformatService.getWaterfactorypoolDataformatById(id);
    }

    /**
    * 通过多个查询
    * @param
    * @return
    */
    @ApiOperation(value = "查找多个服务")
    @RequestMapping(value="/findWaterfactorypoolDataformats",method = RequestMethod.POST, produces = "application/json;" +"charset=UTF-8")
    public List<WaterfactorypoolDataformat> findWaterfactorypoolDataformatListByMap(@ApiParam(name = "WaterfactorypoolDataformat",value = "waterfactorypoolDataformat",required = true)@RequestBody WaterfactorypoolDataformat waterfactorypoolDataformat){

        return waterfactorypoolDataformatService.getWaterfactorypoolDataformatListByMap(null);
    }

    /**
    * 查询总数
    * @param
    * @return
    */
    @ApiOperation(value = "获取总数服务")
    @RequestMapping(value="/count",method = RequestMethod.POST, produces = "application/json;" +"charset=UTF-8")
    public Integer WaterfactorypoolDataformatCount(){
        return waterfactorypoolDataformatService.getWaterfactorypoolDataformatCountByMap(null);
    }

    /**
    * 添加保存
    * @param
    * @return
    */
    @ApiOperation(value = "添加服务")
    @RequestMapping(value="/add",method = RequestMethod.POST, produces = "application/json;" +"charset=UTF-8")
    public boolean addWaterfactorypoolDataformat(@ApiParam(name = "WaterfactorypoolDataformat",value = "waterfactorypoolDataformat对象",required = true)@RequestBody WaterfactorypoolDataformat waterfactorypoolDataformat){
            return waterfactorypoolDataformatService.addWaterfactorypoolDataformat(waterfactorypoolDataformat);
    }

    /**
    * 更新修改
    * @param
    * @return
    */
    @ApiOperation(value = "更新修改服务")
    @RequestMapping(value="/upd",method = RequestMethod.POST, produces = "application/json;" +"charset=UTF-8")
    public boolean modifyWaterfactorypoolDataformat(@ApiParam(name = "WaterfactorypoolDataformat",value = "waterfactorypoolDataformat对象",required = true)@RequestBody WaterfactorypoolDataformat waterfactorypoolDataformat){
        return waterfactorypoolDataformatService.modifyWaterfactorypoolDataformat(waterfactorypoolDataformat);
    }

    /**
    * 删除
    * @param
    * @return
    */
    @ApiOperation(value = "删除服务")
    @RequestMapping(value="/del",method = RequestMethod.POST, produces = "application/json;" +"charset=UTF-8")
    public boolean deleteWaterfactorypoolDataformatById(@ApiParam(name = "WaterfactorypoolDataformat",value = "waterfactorypoolDataformat的id",required = true) @RequestParam(value = "id",required=true)Integer id){
        return waterfactorypoolDataformatService.deleteWaterfactorypoolDataformatById(id);
    }



}
